package com.sau.pixelcart.domain.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 商品核心信息表
 * </p>
 *
 * @author Inton
 * @since 2025-03-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("product")
@ApiModel(value="Product对象", description="商品核心信息表")
public class Product implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "商品唯一标识")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @ApiModelProperty(value = "商品名称（需唯一）")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "商品编号（需唯一）")
    @TableField("code")
    private String code;

    @ApiModelProperty(value = "商品所属分类ID")
    @TableField("category_id")
    private String categoryId;

    @ApiModelProperty(value = "详细描述（支持富文本）")
    @TableField("description")
    private String description;

    @ApiModelProperty(value = "商品价格（精度到分）")
    @TableField("price")
    private BigDecimal price;

    @ApiModelProperty(value = "商品状态")
    @TableField("status")
    private String status;

    @ApiModelProperty(value = "创建时间")
    @TableField("created_time")
    private LocalDateTime createdTime;

    @ApiModelProperty(value = "最后更新时间")
    @TableField("updated_time")
    private LocalDateTime updatedTime;

    @ApiModelProperty(value = "主图URL（支持CDN路径）")
    @TableField("image_url")
    private String imageUrl;

}
